<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ManageCategories.ascx.cs" Inherits="DD.Admin.Controls.ManageCategories" %>

&nbsp;
<asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Insert New Category"></asp:Label>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource2"
    Height="50px" Width="346px" CellPadding="4" ForeColor="#333333" GridLines="None">
    <Fields>
        <asp:CommandField ShowInsertButton="True" />
        <asp:BoundField DataField="NAME" HeaderText="Category Name" />
        <asp:BoundField DataField="ID" Visible="False" />
    </Fields>
    <EmptyDataTemplate>Add New Category</EmptyDataTemplate>
    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True" />
    <EditRowStyle BackColor="#7C6F57" />
    <RowStyle BackColor="#E3EAEB" />
    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
    <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True" />
    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <AlternatingRowStyle BackColor="White" />
</asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource2" Runat="server" ConnectionString="<%$ connectionStrings:LocalSqlServer1 %>"
  SelectCommand="GET_CATEGORIES" SelectCommandType="StoredProcedure" UpdateCommand="sp_UPDATE_CATEGORY" UpdateCommandType="storedProcedure" InsertCommand="sp_ADD_CATEGORY" InsertCommandType="StoredProcedure" DeleteCommand="sp_DELETE_CATEGORY" DeleteCommandType="StoredProcedure">
  
 
  
</asp:SqlDataSource>

<asp:SqlDataSource ID="SqlDataSource1" Runat="server" ConnectionString="<%$ connectionStrings:LocalSqlServer1 %>"
  SelectCommand="GET_CATEGORIES" SelectCommandType="StoredProcedure" UpdateCommand="sp_UPDATE_CATEGORY" UpdateCommandType="storedProcedure" InsertCommand="sp_ADD_CATEGORY" InsertCommandType="StoredProcedure" DeleteCommand="sp_DELETE_CATEGORY" DeleteCommandType="StoredProcedure">
 
  
 

</asp:SqlDataSource>
&nbsp;
<asp:GridView PagerSettings-NextPageText="Next" PagerSettings-Mode="NextPrevious" PagerSettings-PreviousPageText="Prev" DataKeyNames="CAT_ID" ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" DataSourceID="SqlDataSource2" Width="518px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" CellPadding="4" ForeColor="#333333" GridLines="None">
    <Columns>
        <asp:BoundField DataField="CAT_NAME" HeaderText="Category Name" SortExpression="NAME" />
        <asp:BoundField DataField="ID" HeaderText="Category ID" ReadOnly="True" Visible="False"/>
        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True"  />
    </Columns>
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    <EditRowStyle BackColor="#999999" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
